public class AuthFilters {

  def filters = {
    authfilter(controller: '*', action: '*') {
      before = {
        if (!session.user
                && !controllerName.equals('login')
                && (!controllerName.equals('userAccount')
                && !actionName.equals("create"))) {
          // is there no log access in the filter?
          //log.info('Redirect to login page')
          redirect(controller: 'login')
          return false
        }
      }
    }
  }

}